package com.yxw.yxnet_cd_center.customer_service.controller;

import com.yxw.yxnet_cd_center.common.dto.PageVO;
import com.yxw.yxnet_cd_center.common.helper.ResultHelper;
import com.yxw.yxnet_cd_center.common.utils.BaseResult;
import com.yxw.yxnet_cd_center.customer_service.dto.UserChooseDTO;
import com.yxw.yxnet_cd_center.customer_service.service.UserService;
import com.yxw.yxnet_cd_center.customer_service.vo.UserChooseVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 客服人员管理
 * @author liuxin
 * @date 2023.09.
 */
@RestController
@Api(value = "客服人员管理", tags = "客服人员管理")
@Slf4j
@RequestMapping("/user")
public class UserController {

    @Autowired
    private UserService userService;

    @ApiOperation(value = "客服人员选择")
    @PostMapping(value = "/getChooseUserList")
    public BaseResult<PageVO<UserChooseVo>> getChooseUserList(@RequestBody UserChooseDTO dto) {
        PageVO<UserChooseVo> pageVo = userService.getChooseUserList(dto);
        return ResultHelper.fillWithSuccess(pageVo);
    }
}